var assist = {

		init : function() {
			
			assist.assistGrid=$('#assistGrid');

			assist.assistGrid.datagrid({
			 	url:window.ctx + '/AssitDbDateServlet?command=listDatebase',
			 	fixed:true,
			    fitColumns: true,
			    striped: true,
			    rownumbers: true,
			    pagination: true,
			    pageSize: 5,
			    pageList: [5, 10, 15, 20],
			    pageNumber: 1,
			    sortName: 'bakTime',
			    sortOrder: 'DESC',
			    toolbar: '#assistToolbar',
			    columns:[[
			              	{field:'bakUrl', title:'备份地址', width:100, align:'center', sortable: true},
			              	{field:'bakTime', title:'备份时间', width:100, align:'center'},
			            	{field:'operateUserId', title:'操作者ID', width:100, align:'center'},
			    ]],
			
			});
		},
		
		toolbar:{
			add: function() {
				if ($('#examAddForm').form('validate')) {
					$.messager.progress({
						text : '正在处理...'
					});
					$.post( window.ctx + '/AssitDbDateServlet?command=addDatebase','${systemEntiy.id }', function(data) {	
						if (data) {
							$.messager.show({
								title: '系统提示',
								msg: '备份成功！',
								timeout: 3000,
								showType: 'slide'
							});
							assist.assistGrid.datagrid('reload');
						} else {
							$.messager.alert('系统提示', '新增失败！', 'error')
						}
						$.messager.progress('close');
					});
				}
				
			},
		}
}

$(function(){
		assist.init();
});
